<?php
namespace Count\Controller;
use Admin\Controller\AdminbaseController;

class StudentController extends AdminbaseController {
	
	protected $m;
	
	function _initialize(){
		parent::_initialize();
	}
	
	//学年班级学生人数统计
    public function index(){
    	$xnid = I('xnid');
    	$xn_now = R('Api/Termtime/get_term_time_now');
    	if(!$xnid) $xnid = $xn_now['id'];
    	 
    	$this->all = R('Api/Termtime/get_term_time_all');
    	//$this->xuenian = R('Api/Termtime/get_term_time_now');
    	$this->xnid = $xnid;
    	$this->cid = I('cid');
    	
    	$this->display();
    }
    
    public function get_xuenian($xnid){
    	$info = M('YgclTermTime')->where(array('id'=>$xnid))->find();
    	return $info['title'].'('.$info['start_time'].'到'.$info['end_time'].')';
    }
}